package com.controller;

import com.bean.GoodMessage;
import com.service.GoodMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName : MessageController
 * @Auther : acerolan@foxmail.com
 * @Data : 2024/9/20 14:15
 * @Description : 消息
 */
@RestController
public class MessageController {

    @Autowired
    GoodMessageService goodMessageService;


    @GetMapping("/message/huDong")
    public List<Map<String, Object>> getHuDongMessages(@RequestParam("userId") int userId) {
        List<Map<String, Object>> goodMessageList = goodMessageService.getAllUncheckedMessagesBySendToUserId(userId);

        return goodMessageList;
    }


}
